<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title>${title}</title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/am.reference.ftl" />
	</head>
	<body class="${configs["skinName"]}">
		<div class="page-content">
			<div class="row">
			<#if viewMode !="view">
			<#include "common/breadcrumb.ftl">
			</#if>
				<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}" enctype="multipart/form-data">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-body">
								<input type="hidden" name="orderNo" id="orderNo" value="${model.orderNo}" <#if viewMode == "view">disabled</#if>>
								<#if viewMode == "view">
								<div class="widget-header widget-header-flat">
									<h5 class="lighter">
										${module}
									</h5>
								</div>
								<#else>
								<div class="alert alert-warning">
									<strong>提示!</strong>
									<strong style="color:#dd514c;">出现红框</strong>的表示不能为空
								</div>
								</#if>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										物品名称
									</label>
									<div class="col-sm-6">
										<input type="text" id="goodsName" name="goodsName" value="${model.goodsName}" class="form-control" required placeholder="请输入物品名称" <#if viewMode == "view">disabled</#if>>
									</div>
								</div>
								<#if viewMode == 'view'>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										物品图片
									</label>
								<#if model.images?exists && model.images?size gt 0>
								<div class="col-sm-6 row">
								<#list model.images as item>
									<div class="col-sm-3">
										<img src="${item.image}" height="50">
									</div>
								</#list>
								</div>
								</#if>
								</div>
								<#else>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										物品图片1
									</label>
									<div class="col-sm-6">
										<input type="file" name="files" value="" class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										物品图片2
									</label>
									<div class="col-sm-6">
										<input type="file" name="files" value="" class="form-control">
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										物品图片3
									</label>
									<div class="col-sm-6">
										<input type="file" name="files" value="" class="form-control">
									</div>
								</div>
								</#if>
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										联系方式
									</label>
									<div class="col-sm-6">
										<input type="text" id="contact" name="contact" value="${model.contact}" class="form-control" required placeholder="请输入联系方式" <#if viewMode == "view">disabled</#if>>
									</div>
								</div>
								<#if viewMode == "view">
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										发布平台
									</label>
									<div class="col-sm-6">
										<select multiple="multiple" id="platform" name="platform" class="chosen-select form-control" required <#if viewMode == "view">disabled</#if> data-placeholder="请选择平台">
										<#list platforms as platform >
											<option value="${platform.platformValue}" <#if (!model.platform?contains(',') && model.platform == platform.platformValue) || model.platform?contains('${platform.platformValue},')  || model.platform?contains(',${platform.platformValue}') >selected="selected"</#if> >${platform.platformName}</option>
										</#list>
										</select>
									</div>
								</div>
								</#if>
								<#if viewMode != "view">
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="btnSubmit" class="btn btn-info" type="submit">
											<i class="fa fa-check bigger-110"></i>
											提 交
										</button>
									</div>
								</div>
								</#if>
							</div>
						</div>
					</div>
				</form>
			</div>	
		</div>
		<script type="text/javascript">
		$(function(){
			$('.chosen-select').chosen();
			$('input[type="file"]').ace_file_input(imageParms);
			$('#form').validator();
		})
		</script>
	</body>
</html>